TextPipe: Online Help
    Defining Custom Patterns
 

Submit feedback on this topic 

 Home  User Assistance   Tutorials   How to Use TextPipe
 Menus: File   Edit   Filters[ Convert   Add   Remove   Unicode   Replace   Special   Map   Email   Restrict ]  Tools   Window   Help   Advanced
Home
Up

 

 

All memo fields (multi-line text fields) and edit fields that support patterns also provide a menu item for Insert Custom Pattern. The patterns from this list are user-defined, and come from the file custom_patterns.txt in the same folder as TextPipe.exe.

The format for this file is as follows:

  • Comments can be placed on lines beginning with a semi colon
  • Blank lines are ignored
  • A pattern is introduced by a line beginning with '#'. The remainder of this line provides the pattern name which appears in the menu
  • All lines after the pattern name, up to a line starting with ###END###, are treated as part of a pattern.

Here is an example custom_patterns.txt file:

;User-Defined Patterns
;
;custom_patterns.txt - saved in TextPipe's folder (the same folder
;as where textpipe.exe resides)
;
;These patterns can be inserted from the right-click or context menu on
;any TextPipe field that supports patterns

#Internet URls
(FTP|HTTP)://([_a-z\d\-]+(\.[_a-z\d\-]+)+)(([_a-z\d\-\\\./]+[_a-z\d\-\\/])+)*
###END###

#Email addresses
\b([_a-z0-9-]+(\.[_a-z0-9-]+)*)@([_a-z0-9-]+(\.[_a-z0-9-]+)*)\.([a-z]{2,3})\b
###END###

#IP addresses
\b([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])\b
###END###

#Credit card numbers
(\d{3,4})[- ]?(\d{4})[- ]?(\d{4})[- ]?(\d{4})
###END###

 

 

 Contact Us   Support   Community   Tutorials and User Guides (online)
 © 1999-2005 Crystal Software. All rights reserved.